package com.julis.activity.setting;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.baseutils.SpfUtils;
import com.github.czy1121.view.RoundButton;
import com.julis.R;
import com.julis.activity.MainActivity;
import com.julis.activity.dengluzhuce.Login_Activity;
import com.julis.activity.setting.devicegongneng.DeviceSettingActivity;
import com.julis.activity.setting.deviceweihu.DeviceWeiHuActivity;
import com.julis.activity.setting.flowline.FlowLineSettingActivity;
import com.julis.activity.setting.updata.Setting_Remoteupgrade_Activity;
import com.julis.activity.setting.user.UserSettingActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * 流水线检测设置界面
 */
public class Setting_Activity extends Activity {


    @BindView(R.id.img_back)
    RelativeLayout imgBack;
    @BindView(R.id.textarea)
    TextView textarea;
    @BindView(R.id.imageView1511)
    ImageView imageView1511;
    @BindView(R.id.layout_ftp)
    RelativeLayout layoutFtp;
    @BindView(R.id.textView112)
    TextView textView112;
    @BindView(R.id.imageView15)
    ImageView imageView15;
    @BindView(R.id.layout_rizhi)
    RelativeLayout layoutRizhi;
    @BindView(R.id.textView11)
    TextView textView11;
    @BindView(R.id.imageView151)
    ImageView imageView151;
    @BindView(R.id.layout_help)
    RelativeLayout layoutHelp;
    @BindView(R.id.tv_yonghuguanli)
    TextView tvYonghuguanli;
    @BindView(R.id.yonghuguanli)
    RelativeLayout yonghuguanli;
    @BindView(R.id.tv_shebeiweihu)
    TextView tvShebeiweihu;
    @BindView(R.id.shebeiweihu)
    RelativeLayout shebeiweihu;
    @BindView(R.id.tv_liushuixian)
    TextView tvLiushuixian;
    @BindView(R.id.liushuixian)
    RelativeLayout liushuixian;
    @BindView(R.id.tv_shebeigongneng)
    TextView tvShebeigongneng;
    @BindView(R.id.shebeigongneng)
    RelativeLayout shebeigongneng;
    @BindView(R.id.tv_jiaoyi1)
    TextView tvJiaoyi1;
    @BindView(R.id.menu)
    RelativeLayout menu;
    @BindView(R.id.logout)
    RoundButton logout;
    @BindView(R.id.activity_seetting)
    LinearLayout activitySeetting;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_1_seetting);
        ButterKnife.bind(this);


    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

    @OnClick({R.id.img_back, R.id.layout_ftp, R.id.layout_rizhi, R.id.layout_help, R.id.yonghuguanli, R.id.shebeiweihu, R.id.liushuixian, R.id.shebeigongneng, R.id.menu, R.id.logout})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.img_back:
                finish();
                break;
            case R.id.layout_ftp:
                break;
            case R.id.layout_rizhi:
                break;
            case R.id.layout_help:
                startActivity(new Intent(this, Setting_Remoteupgrade_Activity.class));
                break;
            case R.id.yonghuguanli:
                startActivity(new Intent(this, UserSettingActivity.class));
                break;
            case R.id.shebeiweihu:

                startActivity(new Intent(this, DeviceWeiHuActivity.class));
                break;
            case R.id.liushuixian:
                startActivity(new Intent(this, FlowLineSettingActivity.class));
                break;
            case R.id.shebeigongneng:
                startActivity(new Intent(this, DeviceSettingActivity.class));
                break;
            case R.id.menu:
                break;
            case R.id.logout:
                MainActivity.ActivityA.finish();
                SpfUtils.put(this, "islogin", false);
                Toast.makeText(this, "退出成功！", Toast.LENGTH_SHORT).show();
                finish();
                startActivity(new Intent(Setting_Activity.this, Login_Activity.class));
                break;
        }
    }


//    @OnClick({R.id.img_back,R.id.yonghuguanli,R.id.mimaxiugai, R.id.layout_lsxjiaoyi, R.id.layout_area, R.id.menu, R.id.layout_help, R.id.layout_gonglvtiaojie, R.id.layout_jiaoyi, R.id.layout_grzx, R.id.layout_ftp, R.id.layout_rizhi, R.id.logout})
//    public void onViewClicked(View view) {
//        switch (view.getId()) {
//            case R.id.img_back:
//
//                break;
//            case R.id.layout_lsxjiaoyi:
//                startActivity(new Intent(this, Setting_FlowlineTradeTime_Activity.class));
//                break;
//            case R.id.layout_area:
//                startActivity(new Intent(this, AreaActivity.class));
//                break;
//
//            case R.id.layout_rizhi:
//                startActivity(new Intent(this, RizhiActivity.class));
//                break;
//            case R.id.layout_ftp:
//                startActivity(new Intent(this, IPSActivity.class));
//                break;
//
//            case R.id.layout_help:
//
//                break;
//
//            case R.id.layout_gonglvtiaojie:
//                startActivity(new Intent(this, Setting_Power_Activity.class));
//                break;
//            case R.id.layout_jiaoyi:
//                startActivity(new Intent(this, Setting_TradeTime_Activity.class));
//                break;
//            case R.id.layout_grzx:
//
//                startActivity(new Intent(Setting_Activity.this, Setting_Flowline_Activity.class));
//
//                break;
//            case R.id.logout:
//
//                break;
//            case R.id.menu:
//
//                startActivity(new Intent(Setting_Activity.this, Setting_menu_Activity.class));
//                break;
//            case R.id.mimaxiugai:
//
//                startActivity(new Intent(Setting_Activity.this, XiuGai_Activity.class));
//                break;
//            case R.id.yonghuguanli:
//
//                startActivity(new Intent(Setting_Activity.this, User_Activity.class));
//                break;
//
//        }
//    }
}



